home *** CD-ROM | disk | FTP | other *** search
/ Robotics & Artificial Int…3 (Professional Edition) / Robotics & Artificial Intelligence Tools 2003 (Professional Edition).iso / neural network tool and application / nsinstall.exe / data1.cab / Demos_Files / OLE_Automation / frmBuildNetwork.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2002-03-08  |  4.2 KB  |  101 lines

  1. VERSION 5.00
  2. Begin VB.Form frmBuildNetwork 
  3.    Caption         =   "Build Network"
  4.    ClientHeight    =   1104
  5.    ClientLeft      =   9228
  6.    ClientTop       =   3348
  7.    ClientWidth     =   2124
  8.    LinkTopic       =   "Form1"
  9.    MaxButton       =   0   'False
  10.    PaletteMode     =   1  'UseZOrder
  11.    ScaleHeight     =   1104
  12.    ScaleWidth      =   2124
  13.    Begin VB.CommandButton cmdBuildNetwork 
  14.       Caption         =   "Build Network"
  15.       Height          =   375
  16.       Left            =   120
  17.       TabIndex        =   2
  18.       Top             =   600
  19.       Width           =   1815
  20.    End
  21.    Begin VB.TextBox txtHiddenPEs 
  22.       Height          =   285
  23.       Left            =   1320
  24.       TabIndex        =   0
  25.       Text            =   "6"
  26.       Top             =   120
  27.       Width           =   615
  28.    End
  29.    Begin VB.Label lblHiddenPEs 
  30.       Caption         =   "Hidden PE's:"
  31.       Height          =   315
  32.       Left            =   120
  33.       TabIndex        =   1
  34.       Top             =   120
  35.       Width           =   990
  36.    End
  37. Attribute VB_Name = "frmBuildNetwork"
  38. Attribute VB_GlobalNameSpace = False
  39. Attribute VB_Creatable = False
  40. Attribute VB_PredeclaredId = True
  41. Attribute VB_Exposed = False
  42. Private Sub cmdBuildNetwork_Click()
  43.     Dim NSApp As Object
  44.     Dim NSBB As Object
  45.     Dim inputFilePath As String
  46.     Dim desiredFilePath As String
  47.     Set NSApp = CreateObject("NeuroSolutions.Application")
  48.     Set NSBB = NSApp.activeBreadboard
  49.     NSApp.maximize
  50.     NSBB.setAnimatePoint 20, 225
  51.     NSBB.stampAndMove "Axon", "inputAxon"
  52.     NSBB.send "inputAxon. setRows ( 2 )"
  53.     NSBB.setAnimatePoint 110, 225
  54.     NSBB.stampAndMove "FullSynapse", "hidden1Synapse"
  55.     NSBB.send "inputAxon. connectTo ( ""hidden1Synapse"" )"
  56.     NSBB.setAnimatePoint 200, 225
  57.     NSBB.stampAndMove "TanhAxon", "hidden1Axon"
  58.     NSBB.send "hidden1Axon. setRows ( " & txtHiddenPEs.Text & " )"
  59.     NSBB.send "hidden1Synapse. connectTo ( ""hidden1Axon"" )"
  60.     NSBB.setAnimatePoint 290, 225
  61.     NSBB.stampAndMove "FullSynapse", "outputSynapse"
  62.     NSBB.send "hidden1Axon. connectTo ( ""outputSynapse"" )"
  63.     NSBB.setAnimatePoint 380, 225
  64.     NSBB.stampAndMove "TanhAxon", "outputAxon"
  65.     NSBB.send "outputSynapse. connectTo ( ""outputAxon"" )"
  66.     NSBB.setAnimatePoint 470, 225
  67.     NSBB.stampAndMove "L2Criterion", "criterion"
  68.     NSBB.send "criterion. setRows ( 1 )"
  69.     NSBB.send "outputAxon. connectTo ( ""criterion"" )"
  70.     NSBB.setAnimatePoint 15, 200
  71.     NSBB.stampAndMove "StaticControl", "control"
  72.     NSBB.stampOnAndMove "BackStaticControl", "control"
  73.     NSBB.send "controlBackprop. setGradientClassName ( ""Momentum"" )"
  74.     NSBB.send "controlBackprop. allocateBackpropPlane (  )"
  75.     NSBB.stampOnAndMove "File", "inputAxon"
  76.     NSBB.send "file. setName ( ""inputFile"" )"
  77.     NSBB.send "inputFile. setActiveAccessPoint ( ""Pre-Activity"" )"
  78.     inputFilePath = NSApp.pathFromNS("Demos\OLE Automation\box.asc")
  79.     NSBB.send "inputFile. addFile ( """ & inputFilePath & """ , False )"
  80.     NSBB.send "inputFile. setUseDefaultTranslatorForActiveFile ( FALSE,FALSE )"
  81.     NSBB.send "inputFile. setActiveTranslatorName ( ""ASCII - Column"",FALSE )"
  82.     NSBB.send "inputFile. setNormalize ( FALSE )"
  83.     NSBB.stampOnAndMove "File", "criterion"
  84.     NSBB.send "file. setName ( ""desiredFile"" )"
  85.     NSBB.send "desiredFile. setActiveAccessPoint ( ""Desired Signal"" )"
  86.     desiredFilePath = NSApp.pathFromNS("Demos\OLE Automation\boxDesired.asc")
  87.     NSBB.send "desiredFile. addFile ( """ & desiredFilePath & """ ,FALSE )"
  88.     NSBB.send "desiredFile. setUseDefaultTranslatorForActiveFile ( FALSE,FALSE )"
  89.     NSBB.send "desiredFile. setActiveTranslatorName ( ""ASCII - Column"",FALSE )"
  90.     NSBB.send "desiredFile. setNormalize ( FALSE )"
  91.     NSBB.stampOnAndMove "DataStorage", "criterion"
  92.     NSBB.send "dataStorage. setActiveAccessPoint ( ""Average Cost"" )"
  93.     NSBB.stampOnAndMove "MatrixViewer", "dataStorage"
  94.     NSBB.send "matrixViewer. setName ( ""trainingCostProbe"" )"
  95.         
  96.     NSBB.Select "Null", False
  97.     NSBB.send "nextButton. setMacroAction ( 1 )"
  98.     NSBB.send "nextButton. setColor ( 255,0,0 )"
  99.     End
  100. End Sub
  101.